import request from '@/utils/request';

// 获取一级分类
export const reqGetCategorylevelOne = () => request.get(`/dev-list/admin/product/getCategory1`)

// 获取二级分类 这里用的是1级分类的ID
export const reqGetCategorylevelTwo = (id) => request.get(`/dev-list/admin/product/getCategory2/${id}`)

//获取三级分类  这里用的是2级分类的ID
export const reqGetCategorylevelThree = (id) => request.get(`/dev-list/admin/product/getCategory3/${id}`)

// 获取arrtInfoList
export const reqGetArrtInfoList = (levelOneId, levelTwoId, levelThreeId) => request.get(`/dev-list/admin/product/attrInfoList/${levelOneId}/${levelTwoId}/${levelThreeId}`)

// 保存属性
export const reqAddOrUpdateAttr = (data) => request.post(`/dev-list/admin/product/saveAttrInfo`, data)

// 删除attr
export const reqDeleteAttr = (id) => request.delete(`/dev-list/admin/product/deleteAttr/${id}`)